package com.lianda.mutiple.pattern.aobj.example;

import com.lianda.mutiple.pattern.future.Future;

import static java.lang.Thread.currentThread;

public class AobjTest {
    public static void main(String[] args) throws Exception {
        OrderService orderService = OrderServiceFactory.toActiveObject(new OrderServiceImpl());
//        orderService.order("hello", 453453);
        Future<String> future = orderService.findOrderDetails(23423);
        System.out.println("Return immediately");
        System.out.println(future.get());

//        currentThread().join();
    }
}
